package cn.kailangtu.dataspot.data;

import cn.kailangtu.commonevents.data.DataBean;

public class BaseData {
    private DataBean<Integer> voltageA;
    private DataBean<Integer> voltageB;
    private DataBean<Integer> voltageC;
    private DataBean<Integer> electricA;
    private DataBean<Integer> electricB;
    private DataBean<Integer> electricC;
    private DataBean<Integer> commontTempurature;

    private DataBean<Integer> matherLineTempurature;
    private DataBean<Integer> outLineTempurature;

    private DataBean<Integer> switchRunTime;
    private DataBean<Integer> electricCount;
    private DataBean<Integer> openingCount;

    private DataBean<Integer> ratedVoltage;
    private DataBean<Integer> ratedCurrent;
    private DataBean<Integer> overloadCurrent;
    private DataBean<Integer> shortCircuitCurrent;

    private DataBean<Integer> runStatus;

    private DataBean<Integer> openingStatus;

    public BaseData()
    {

        openingStatus = new DataBean<>("合闸状态",0);
        voltageA = new DataBean<>("Uab",0);
        voltageB = new DataBean<>("Ubc",0);
        voltageC = new DataBean<>("Uca",0);
        electricA = new DataBean<>("la",0);
        electricB = new DataBean<>("lb",0);
        electricC = new DataBean<>("lc",0);
        commontTempurature = new DataBean<>("温度",0);
        matherLineTempurature = new DataBean<>("母线温度",0,0,0);
        outLineTempurature = new DataBean<>("出线温度",0,0,0);
        switchRunTime = new DataBean<>("运行时间",0);
        electricCount = new DataBean<>("电度",0);
        openingCount = new DataBean<>("合闸次数",0);
        ratedVoltage = new DataBean<>("额定电压",0);
        ratedCurrent = new DataBean<>("额定电流",0);
        overloadCurrent = new DataBean<>("过载电流",0);
        shortCircuitCurrent = new DataBean<>("短路电流",0);
        runStatus = new DataBean<>("运行状态",0);
    }


    public DataBean<Integer> getVoltageA() {
        return voltageA;
    }

    public void setVoltageA(DataBean<Integer> voltageA) {
        this.voltageA = voltageA;
    }

    public DataBean<Integer> getVoltageB() {
        return voltageB;
    }

    public void setVoltageB(DataBean<Integer> voltageB) {
        this.voltageB = voltageB;
    }

    public DataBean<Integer> getVoltageC() {
        return voltageC;
    }

    public void setVoltageC(DataBean<Integer> voltageC) {
        this.voltageC = voltageC;
    }

    public DataBean<Integer> getElectricA() {
        return electricA;
    }

    public void setElectricA(DataBean<Integer> electricA) {
        this.electricA = electricA;
    }

    public DataBean<Integer> getElectricB() {
        return electricB;
    }

    public void setElectricB(DataBean<Integer> electricB) {
        this.electricB = electricB;
    }

    public DataBean<Integer> getElectricC() {
        return electricC;
    }

    public void setElectricC(DataBean<Integer> electricC) {
        this.electricC = electricC;
    }

    public DataBean<Integer> getCommontTempurature() {
        return commontTempurature;
    }

    public void setCommontTempurature(DataBean<Integer> commontTempurature) {
        this.commontTempurature = commontTempurature;
    }

    public DataBean<Integer> getMatherLineTempurature() {
        return matherLineTempurature;
    }

    public void setMatherLineTempurature(DataBean<Integer> matherLineTempurature) {
        this.matherLineTempurature = matherLineTempurature;
    }

    public DataBean<Integer> getOutLineTempurature() {
        return outLineTempurature;
    }

    public void setOutLineTempurature(DataBean<Integer> outLineTempurature) {
        this.outLineTempurature = outLineTempurature;
    }

    public DataBean<Integer> getSwitchRunTime() {
        return switchRunTime;
    }

    public void setSwitchRunTime(DataBean<Integer> switchRunTime) {
        this.switchRunTime = switchRunTime;
    }

    public DataBean<Integer> getElectricCount() {
        return electricCount;
    }

    public void setElectricCount(DataBean<Integer> electricCount) {
        this.electricCount = electricCount;
    }

    public DataBean<Integer> getOpeningCount() {
        return openingCount;
    }

    public void setOpeningCount(DataBean<Integer> openingCount) {
        this.openingCount = openingCount;
    }

    public DataBean<Integer> getRatedVoltage() {
        return ratedVoltage;
    }

    public void setRatedVoltage(DataBean<Integer> ratedVoltage) {
        this.ratedVoltage = ratedVoltage;
    }

    public DataBean<Integer> getRatedCurrent() {
        return ratedCurrent;
    }

    public void setRatedCurrent(DataBean<Integer> ratedCurrent) {
        this.ratedCurrent = ratedCurrent;
    }

    public DataBean<Integer> getOverloadCurrent() {
        return overloadCurrent;
    }

    public void setOverloadCurrent(DataBean<Integer> overloadCurrent) {
        this.overloadCurrent = overloadCurrent;
    }

    public DataBean<Integer> getShortCircuitCurrent() {
        return shortCircuitCurrent;
    }

    public void setShortCircuitCurrent(DataBean<Integer> shortCircuitCurrent) {
        this.shortCircuitCurrent = shortCircuitCurrent;
    }

    public DataBean<Integer> getRunStatus() {
        return runStatus;
    }

    public void setRunStatus(DataBean<Integer> runStatus) {
        this.runStatus = runStatus;
    }

    public DataBean<Integer> getOpeningStatus() {
        return openingStatus;
    }

    public void setOpeningStatus(DataBean<Integer> openingStatus) {
        this.openingStatus = openingStatus;
    }

    public static String getRunStatusHigh(int value) {
        String result = "正  常";
        switch (value) {
            case 0:
                result = "充电中...";
                break;
            case 1:
                result = "正  常";
                break;
            case 2:
                result = "短路故障";
                break;
            case 3:
                result = "过载故障";
                break;
            case 4:
                result = "远方分励";
                break;
            case 5:
                result = "过压故障";
                break;
            case 6:
                result = "欠压故障";
                break;
            case 7:
                result = "温度开路";
                break;
            case 8:
                result = "低压侧故障";
                break;
            case 9:
                result = "粘连故障";
                break;
            case 10:
                result = "触点故障";
                break;
            case 11:
                result = "不平衡故障";
                break;
            case 12:
                result = "风电故障";
                break;
            case 13:
                result = "瓦斯故障";
                break;
            case 15:
                result = "超温保护";
                break;
            case 16:
                result = "绝缘故障";
                break;
            case 17:
                result = "绝缘断开";
                break;
            case 18:
                result = "过流故障";
                break;
            case 19:
                result = "接线柱温度故障";
                break;
            case 20:
                result = "断相故障";
                break;
        }

        return result;
    }

    public static String getRunStatusLow(int value) {
        String result = "正  常";
        switch (value) {
            case 1:
                result = "正  常";
                break;
            case 2:
                result = "短路故障";
                break;
            case 3:
                result = "过载故障";
                break;
            case 4:
                result = "低压分闸";
                break;
            case 5:
                result = "过压故障";
                break;
            case 6:
                result = "欠压故障";
                break;
            case 7:
                result = "温度断开";
                break;
            case 8:
                result = "漏电故障";
                break;
            case 11:
                result = "不平衡故障";
                break;
            case 12:
                result = "风电故障";
                break;
            case 13:
                result = "瓦斯故障";
                break;
            case 15:
                result = "漏电闭锁";
                break;
            case 16:
                result = "过流故障";
                break;
            case 17:
                result = "温度故障";
                break;
            case 18:
                result = "接线柱温度故障";
                break;
            case 19:
                result = "断相故障";
                break;
        }

        return result;
    }
}
